package structural

import "strconv"

type IAdapt interface {
	Show(str string) error
}

type SAdaptOne struct{}

func (SAdaptOne) Show(number int) int {
	return number
}

type SAdapter struct {
	SAdaptOne
}

func (s *SAdapter) Show(str string) error {
	atom, err := strconv.Atoi(str)
	if err != nil {
		return err
	}

	s.SAdaptOne.Show(atom)

	return nil
}
